#include "ollama_client.hpp"
#include <iostream>

int main(int argc, char* argv[]) {
    // Check if text content is provided as command line argument
    if (argc != 2) {
        std::cerr << "Usage: " << argv[0] << " \"text content\"" << std::endl;
        std::cerr << "Example: " << argv[0] << " \"你是谁\"" << std::endl;
        return 1;
    }
    
    try {
        std::string user_input = argv[1];
        std::string reply = ollama::chat_with_ollama(user_input);
        std::cout << reply << std::endl;
    } catch (const std::exception& ex) {
        std::cerr << "Error: " << ex.what() << std::endl;
        return 1;
    }
    return 0;
}